**************************************************************************************************************************************************
****************************** Wealth-Income Ratios in Free Market Capitalism: Switzerland, 1900-2020 ********************************************
**************************************************************************************************************************************************

clear all
set more off
set scheme s1color  
cap set scheme mygraphs

**Author: Enea Baselgia and Isabel Z. Martinez
**Date: January, 25 2023

*** set this path to the current directory
*** global mypath "C:\Users\EBaselgia\Dropbox\WIR_project\Publication_process\replication"

*** EXTENSION C: CROSS-COUNTRY EVIDENCE ON WIR AND HOUSING PRICES ***


* Panel REGRESS WIR ON STOCK PRICES AND REAL ESTATE PRICES*
/* countries: CH DE FR GB IT SE US AU CA ES JP NO
	indices: OECD nominal Houseprice index (deflated with CPI), OECD Shareprice index (deflated with CPI), MSCI world index (deflated with CPI)
*/

* * * READ DATA * * * 
cd "$mypath/final_data/"
use "house_price_final_data.dta", clear
cd "$mypath/output/extension_C/"


drop au_pWIR_offici de_pWIR_offici fr_pWIR_offici es_pWIR_offici it_pWIR_offici gb_pWIR_offici se_pWIR_offici us_pWIR_offici jp_pWIR_offici no_pWIR_offici ca_pWIR_offici
drop if year < 1970
drop if year > 2019

tsset year

  
 
 
** gen growth rates
foreach var in ch_pWIR de_pWIR fr_pWIR gb_pWIR it_pWIR se_pWIR us_pWIR au_pWIR ca_pWIR es_pWIR jp_pWIR no_pWIR ///
 au_houseP_real_cpi ca_houseP_real_cpi ch_houseP_real_cpi de_houseP_real_cpi es_houseP_real_cpi fr_houseP_real_cpi ////
 gb_houseP_real_cpi it_houseP_real_cpi jp_houseP_real_cpi no_houseP_real_cpi se_houseP_real_cpi us_houseP_real_cpi ////
 au_shareP_real_cpi ca_shareP_real_cpi ch_shareP_real_cpi de_shareP_real_cpi es_shareP_real_cpi fr_shareP_real_cpi ///
 gb_shareP_real_cpi it_shareP_real_cpi jp_shareP_real_cpi no_shareP_real_cpi se_shareP_real_cpi us_shareP_real_cpi MSCI_real_cpi{
	gen `var'_dif = (D.`var'/L.`var')*100
}


foreach var in ch de fr gb it se us au ca es jp no{
	label var `var'_pWIR_dif "Wealth-Income ratio, `var' (annual change in %)"
	label var `var'_houseP_real_cpi_dif "real house price index, `var' (annual change in %)"
	label var `var'_shareP_real_cpi_dif "real share price index, `var' (annual change in %)"
} 
 
 
 foreach var in ch de fr gb it se us au ca es jp no{
	drop `var'_pWIR
	drop `var'_houseP_real_cpi
	drop `var'_shareP_real_cpi
	drop `var'_nni_T_R
} 
drop MSCI_real_cpi
 
 
 foreach var in ch de fr gb it se us au ca es jp no{
	gen `var'_MSCI_real_cpi_dif = MSCI_real_cpi_dif
	label var `var'_MSCI_real_cpi_dif "MSCI world index real (annual change in %)"
} 
drop MSCI_real_cpi_dif

 
 
 
 **** rename all variables to capital country codes letters to create figures
foreach var in pWIR_dif houseP_real_cpi_dif shareP_real_cpi_dif MSCI_real_cpi_dif{
	rename au_`var' `var'_AU
	rename ca_`var' `var'_CA
	rename ch_`var' `var'_CH
	rename de_`var' `var'_DE
	rename es_`var' `var'_ES
	rename fr_`var' `var'_FR
	rename gb_`var' `var'_GB
	rename it_`var' `var'_IT
	rename jp_`var' `var'_JP
	rename no_`var' `var'_NO
	rename se_`var' `var'_SE
	rename us_`var' `var'_US
}

*** Reshape date from wide to long
 reshape long pWIR_dif_ houseP_real_cpi_dif_ shareP_real_cpi_dif_ MSCI_real_cpi_dif_, i(year) j(country) string 
 
 
 gen ctryid=.
 
 
 replace ctryid = 1 if country=="AU"
 replace ctryid = 2 if country=="CA"
 replace ctryid = 3 if country=="CH"
 replace ctryid = 4 if country=="DE"
 replace ctryid = 5 if country=="ES"
 replace ctryid = 6 if country=="FR"
 replace ctryid = 7 if country=="GB"
 replace ctryid = 8 if country=="IT"
 replace ctryid = 9 if country=="JP"
 replace ctryid = 10 if country=="NO"
 replace ctryid = 11 if country=="SE"
 replace ctryid = 12 if country=="US"
 
 
 *** set up panel 
 sort ctryid year
 xtset ctryid year
 xtsum
 
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
* * * * * * * * *PANEL REGRESSIONS with 2way clustering * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 

gen noabsorb=1
**** Pooled OLS ***

*** Model 1***
display "Pooled OLS REGRESSION RESULTS FOR only housing"	
reghdfe pWIR_dif_ houseP_real_cpi_dif_, absorb(noabsorb) cluster(ctryid year)
estimates store m1, title("(1)")

*** Model 2***
display "Pooled OLS REGRESSION RESULTS FOR only stocks"	
reghdfe pWIR_dif_ shareP_real_cpi_dif_, absorb(noabsorb) cluster(ctryid year)
estimates store m2, title("(2)")
	
*** Model 3***
display "Pooled OLS REGRESSION RESULTS FOR housing and stocks"	
reghdfe pWIR_dif_ houseP_real_cpi_dif_ shareP_real_cpi_dif_, absorb(noabsorb) cluster(ctryid year)
estimates store m3, title("(3)")


*** Model 4***
display "Pooled OLS REGRESSION RESULTS FOR housing, stocks and MSCI"
reghdfe pWIR_dif_ houseP_real_cpi_dif_ shareP_real_cpi_dif_ MSCI_real_cpi_dif_, absorb(noabsorb) cluster(ctryid year)
estimates store m4, title("(4)")

* STORE REGRESSION TABLES for pooled OLS

cap rm 2way_pooledOLS.tex
estout m1 m2 m3 m4 using RR_2way_pooledOLS.tex ///
, style(tex) starlevels(* 0.10 ** 0.05 *** 0.010) drop(_cons) varlabels(houseP_real_cpi_dif_ "House prices" shareP_real_cpi_dif_ "Share prices" MSCI_real_cpi_dif_ "MSCI world" _cons Constant)  ///
append  stats(r2_a N, fmt(%9.3f %9.0g) labels("\rule{0pt}{1.6em}Adj. R$^2$" "Obs.")) cells( "b(star fmt(2)) se(fmt(2) par)") ///
/*title("`CTRY' & & & & \\")*/  mlabels(none)  collabels(none)

	
	
**** Time Fixed Effects ***
*** Model 5***
display "Time FE REGRESSION RESULTS FOR only housing"	
reghdfe pWIR_dif_ houseP_real_cpi_dif_, absorb(year) cluster(ctryid year)
estimates store m5, title("(5)")


*** Model 6***
display "Time FE REGRESSION RESULTS FOR only stocks"	
reghdfe pWIR_dif_ shareP_real_cpi_dif_, absorb(year) cluster(ctryid year)
estimates store m6, title("(6)")

	
*** Model 7***
display "Time FE REGRESSION RESULTS FOR housing and stocks"	
reghdfe pWIR_dif_ houseP_real_cpi_dif_ shareP_real_cpi_dif_, absorb(year) cluster(ctryid year)
estimates store m7, title("(7)")
	
	
*** Model 8***
display "Time FE REGRESSION RESULTS FOR housing, stocks and MSCI"
reghdfe pWIR_dif_ houseP_real_cpi_dif_ shareP_real_cpi_dif_ MSCI_real_cpi_dif_, absorb(year) cluster(ctryid year)
estimates store m8, title("(8)")
	
	

* STORE REGRESSION TABLES for Time FE 

cap rm 2way_panelreg_timeFE.tex
estout m5 m6 m7 m8 using RR_2way_panelreg_timeFE.tex ///
, style(tex) starlevels(* 0.10 ** 0.05 *** 0.010) drop(_cons) varlabels(houseP_real_cpi_dif_ "House prices" shareP_real_cpi_dif_ "Share prices" MSCI_real_cpi_dif_ "MSCI world" _cons Constant)  ///
append  stats(r2_a N, fmt(%9.3f %9.0g) labels("\rule{0pt}{1.6em}Adj. R$^2$" "Obs.")) cells( "b(star fmt(2)) se(fmt(2) par)") ///
/*title("`CTRY' & & & & \\")*/  mlabels(none)  collabels(none)
	
	

**** Country Fixed Effects ***
*** Model 9***
display "Country FE REGRESSION RESULTS FOR only housing"	
reghdfe pWIR_dif_ houseP_real_cpi_dif_, absorb(ctryid) cluster(ctryid year)
estimates store m9, title("(9)")


*** Model 10***
display "Country FE REGRESSION RESULTS FOR only stocks"	
reghdfe pWIR_dif_ shareP_real_cpi_dif_, absorb(ctryid) cluster(ctryid year)
estimates store m10, title("(10)")

	
*** Model 11***
display "Country FE REGRESSION RESULTS FOR housing and stocks"	
reghdfe pWIR_dif_ houseP_real_cpi_dif_ shareP_real_cpi_dif_, absorb(ctryid) cluster(ctryid year)
estimates store m11, title("(11)")
	
	
*** Model 12***
display "Country FE REGRESSION RESULTS FOR housing, stocks and MSCI"
reghdfe pWIR_dif_ houseP_real_cpi_dif_ shareP_real_cpi_dif_ MSCI_real_cpi_dif_, absorb(ctryid) cluster(ctryid year)
estimates store m12, title("(12)")
	
	


* STORE REGRESSION TABLES for Country FE 

cap rm 2way_panelreg_countryFE.tex
estout m9 m10 m11 m12 using RR_2way_panelreg_countryFE.tex ///
, style(tex) starlevels(* 0.10 ** 0.05 *** 0.010) drop(_cons) varlabels(houseP_real_cpi_dif_ "House prices" shareP_real_cpi_dif_ "Share prices" MSCI_real_cpi_dif_ "MSCI world" _cons Constant)  ///
append  stats(r2_a N, fmt(%9.3f %9.0g) labels("\rule{0pt}{1.6em}Adj. R$^2$" "Obs.")) cells( "b(star fmt(2)) se(fmt(2) par)") ///
/*title("`CTRY' & & & & \\")*/  mlabels(none)  collabels(none)
		
	
	
	

**** Time and Country Fixed Effects ***
*** Mode l3***
display "Time FE REGRESSION RESULTS FOR only housing"	
reghdfe pWIR_dif_ houseP_real_cpi_dif_, absorb(ctryid year) cluster(ctryid year)
estimates store m13, title("(13)")


*** Model 14***
display "Time FE REGRESSION RESULTS FOR only stocks"	
reghdfe pWIR_dif_ shareP_real_cpi_dif_, absorb(ctryid year) cluster(ctryid year)
estimates store m14, title("(14)")

	
*** Model 15***
display "Time FE REGRESSION RESULTS FOR housing and stocks"	
reghdfe pWIR_dif_ houseP_real_cpi_dif_ shareP_real_cpi_dif_, absorb(ctryid year) cluster(ctryid year)
estimates store m15, title("(15)")
	
	
*** Model 16***
display "Time FE REGRESSION RESULTS FOR housing, stocks and MSCI"
reghdfe pWIR_dif_ houseP_real_cpi_dif_ shareP_real_cpi_dif_ MSCI_real_cpi_dif_, absorb(ctryid year) cluster(ctryid year)
estimates store m16, title("(16)")
		
	
	
* STORE REGRESSION TABLES for Time and Country FE 

cap rm 2way_panelreg_country_timeFE.tex
estout m13 m14 m15 m16 using RR_2way_panelreg_country_timeFE.tex ///
, style(tex) starlevels(* 0.10 ** 0.05 *** 0.010) drop(_cons) varlabels(houseP_real_cpi_dif_ "House prices" shareP_real_cpi_dif_ "Share prices" MSCI_real_cpi_dif_ "MSCI world" _cons Constant)  ///
append  stats(r2_a N, fmt(%9.3f %9.0g) labels("\rule{0pt}{1.6em}Adj. R$^2$" "Obs.")) cells( "b(star fmt(2)) se(fmt(2) par)") ///
/*title("`CTRY' & & & & \\")*/  mlabels(none)  collabels(none)





* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
* * * * * * * * ** * * * * REGRESSIONS  post 1990 * * * * * * * * * * * * * * 
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 

* * * READ DATA * * * 
cd "$mypath/final_data/"
use "house_price_final_data.dta", clear
cd "$mypath/output/extension_C/"


drop au_pWIR_offici de_pWIR_offici fr_pWIR_offici es_pWIR_offici it_pWIR_offici gb_pWIR_offici se_pWIR_offici us_pWIR_offici jp_pWIR_offici no_pWIR_offici ca_pWIR_offici
drop if year < 1970
tsset year

 
 
** gen growth rates
foreach var in ch_pWIR de_pWIR fr_pWIR gb_pWIR it_pWIR se_pWIR us_pWIR au_pWIR ca_pWIR es_pWIR jp_pWIR no_pWIR ///
 au_houseP_real_cpi ca_houseP_real_cpi ch_houseP_real_cpi de_houseP_real_cpi es_houseP_real_cpi fr_houseP_real_cpi ////
 gb_houseP_real_cpi it_houseP_real_cpi jp_houseP_real_cpi no_houseP_real_cpi se_houseP_real_cpi us_houseP_real_cpi ////
 au_shareP_real_cpi ca_shareP_real_cpi ch_shareP_real_cpi de_shareP_real_cpi es_shareP_real_cpi fr_shareP_real_cpi ///
 gb_shareP_real_cpi it_shareP_real_cpi jp_shareP_real_cpi no_shareP_real_cpi se_shareP_real_cpi us_shareP_real_cpi MSCI_real_cpi{
	gen `var'_dif = (D.`var'/L.`var')*100
}


foreach var in ch de fr gb it se us au ca es jp no{
	label var `var'_pWIR_dif "Wealth-Income ratio, `var' (annual change in %)"
	label var `var'_houseP_real_cpi_dif "real house price index, `var' (annual change in %)"
	label var `var'_shareP_real_cpi_dif "real share price index, `var' (annual change in %)"
} 
 
 
 foreach var in ch de fr gb it se us au ca es jp no{
	drop `var'_pWIR
	drop `var'_houseP_real_cpi
	drop `var'_shareP_real_cpi
	drop `var'_nni_T_R
} 
drop MSCI_real_cpi
 
 
 foreach var in ch de fr gb it se us au ca es jp no{
	gen `var'_MSCI_real_cpi_dif = MSCI_real_cpi_dif
	label var `var'_MSCI_real_cpi_dif "MSCI world index real (annual change in %)"
} 
drop MSCI_real_cpi_dif

 
 
 
 **** rename all variables to capital country codes letters to create figures
foreach var in pWIR_dif houseP_real_cpi_dif shareP_real_cpi_dif MSCI_real_cpi_dif{
	rename au_`var' `var'_AU
	rename ca_`var' `var'_CA
	rename ch_`var' `var'_CH
	rename de_`var' `var'_DE
	rename es_`var' `var'_ES
	rename fr_`var' `var'_FR
	rename gb_`var' `var'_GB
	rename it_`var' `var'_IT
	rename jp_`var' `var'_JP
	rename no_`var' `var'_NO
	rename se_`var' `var'_SE
	rename us_`var' `var'_US
}

*** Reshape date from wide to long
 reshape long pWIR_dif_ houseP_real_cpi_dif_ shareP_real_cpi_dif_ MSCI_real_cpi_dif_, i(year) j(country) string 
 
 
 gen ctryid=.
 
 
 replace ctryid = 1 if country=="AU"
 replace ctryid = 2 if country=="CA"
 replace ctryid = 3 if country=="CH"
 replace ctryid = 4 if country=="DE"
 replace ctryid = 5 if country=="ES"
 replace ctryid = 6 if country=="FR"
 replace ctryid = 7 if country=="GB"
 replace ctryid = 8 if country=="IT"
 replace ctryid = 9 if country=="JP"
 replace ctryid = 10 if country=="NO"
 replace ctryid = 11 if country=="SE"
 replace ctryid = 12 if country=="US"
 
***post 1990
drop if year < 1990
drop if year > 2019

 *** set up panel 
 sort ctryid year
 xtset ctryid year
 xtsum




 
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
* * * * * * * * * * * * * * *PANEL REGRESSIONS * * * * * * * ** * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 

gen noabsorb=1
**** Pooled OLS ***

*** Model 1***
display "Pooled OLS REGRESSION RESULTS FOR only housing"	
reghdfe pWIR_dif_ houseP_real_cpi_dif_, absorb(noabsorb) cluster(ctryid year)
estimates store m1_1990, title("(1)")

	
*** Model 2***
display "Pooled OLS REGRESSION RESULTS FOR only stocks"	
reghdfe pWIR_dif_ shareP_real_cpi_dif_, absorb(noabsorb) cluster(ctryid year)
estimates store m2_1990, title("(2)")

	
*** Model 3***
display "Pooled OLS REGRESSION RESULTS FOR housing and stocks"	
reghdfe pWIR_dif_ houseP_real_cpi_dif_ shareP_real_cpi_dif_, absorb(noabsorb) cluster(ctryid year)
estimates store m3_1990, title("(3)")
	
	
*** Model 4***
display "Pooled OLS REGRESSION RESULTS FOR housing, stocks and MSCI"
reghdfe pWIR_dif_ houseP_real_cpi_dif_ shareP_real_cpi_dif_ MSCI_real_cpi_dif_, absorb(noabsorb) cluster(ctryid year)
estimates store m4_1990, title("(4)")
		

		

* STORE REGRESSION TABLES pooled OLS post 1990


cap rm 2way_1990_pooledOLS.tex
estout m1_1990 m2_1990 m3_1990 m4_1990 using RR_2way_1990_pooledOLS.tex ///
, style(tex) starlevels(* 0.10 ** 0.05 *** 0.010) drop(_cons) varlabels(houseP_real_cpi_dif_ "House prices" shareP_real_cpi_dif_ "Share prices" MSCI_real_cpi_dif_ "MSCI world" _cons Constant)  ///
append  stats(r2_a N, fmt(%9.3f %9.0g) labels("\rule{0pt}{1.6em}Adj. R$^2$" "Obs.")) cells( "b(star fmt(2)) se(fmt(2) par)") ///
/*title("`CTRY' & & & & \\")*/  mlabels(none)  collabels(none)
	
		
		
	

**** Time Fixed Effects ***
*** Model 5***
display "Time FE REGRESSION RESULTS FOR only housing"	
reghdfe pWIR_dif_ houseP_real_cpi_dif_, absorb(year) cluster(ctryid year)
estimates store m5_1990, title("(5)")


*** Model 6***
display "Time FE REGRESSION RESULTS FOR only stocks"	
reghdfe pWIR_dif_ shareP_real_cpi_dif_, absorb(year) cluster(ctryid year)
estimates store m6_1990, title("(6)")

	
*** Model 7***
display "Time FE REGRESSION RESULTS FOR housing and stocks"	
reghdfe pWIR_dif_ houseP_real_cpi_dif_ shareP_real_cpi_dif_, absorb(year) cluster(ctryid year)
estimates store m7_1990, title("(7)")
	
	
*** Model 8***
display "Time FE REGRESSION RESULTS FOR housing, stocks and MSCI"
reghdfe pWIR_dif_ houseP_real_cpi_dif_ shareP_real_cpi_dif_ MSCI_real_cpi_dif_, absorb(year) cluster(ctryid year)
estimates store m8_1990, title("(8)")

	

* STORE REGRESSION TABLES time FE post 1990


cap rm 2way_1990_timeFE.tex
estout m5_1990 m6_1990 m7_1990 m8_1990 using RR_2way_1990_timeFE.tex ///
, style(tex) starlevels(* 0.10 ** 0.05 *** 0.010) drop(_cons) varlabels(houseP_real_cpi_dif_ "House prices" shareP_real_cpi_dif_ "Share prices" MSCI_real_cpi_dif_ "MSCI world" _cons Constant)  ///
append  stats(r2_a N, fmt(%9.3f %9.0g) labels("\rule{0pt}{1.6em}Adj. R$^2$" "Obs.")) cells( "b(star fmt(2)) se(fmt(2) par)") ///
/*title("`CTRY' & & & & \\")*/  mlabels(none)  collabels(none)

		

**** Country Fixed Effects ***
*** Model 9***
display "Country FE REGRESSION RESULTS FOR only housing"	
reghdfe pWIR_dif_ houseP_real_cpi_dif_, absorb(ctryid) cluster(ctryid year)
estimates store m9_1990, title("(9)")


*** Model 10***
display "Country FE REGRESSION RESULTS FOR only stocks"	
reghdfe pWIR_dif_ shareP_real_cpi_dif_, absorb(ctryid) cluster(ctryid year)
estimates store m10_1990, title("(10)")

	
*** Model 11***
display "Country FE REGRESSION RESULTS FOR housing and stocks"	
reghdfe pWIR_dif_ houseP_real_cpi_dif_ shareP_real_cpi_dif_, absorb(ctryid) cluster(ctryid year)
estimates store m11_1990, title("(11)")
	
	
*** Model 12***
display "Country FE REGRESSION RESULTS FOR housing, stocks and MSCI"
reghdfe pWIR_dif_ houseP_real_cpi_dif_ shareP_real_cpi_dif_ MSCI_real_cpi_dif_, absorb(ctryid) cluster(ctryid year)
estimates store m12_1990, title("(12)")
	
	
	

* STORE REGRESSION TABLES country FE post 1990


cap rm 2way_1990_countryFE.tex
estout m9_1990 m10_1990 m11_1990 m12_1990 using RR_2way_1990_countryFE.tex ///
, style(tex) starlevels(* 0.10 ** 0.05 *** 0.010) drop(_cons) varlabels(houseP_real_cpi_dif_ "House prices" shareP_real_cpi_dif_ "Share prices" MSCI_real_cpi_dif_ "MSCI world" _cons Constant)  ///
append  stats(r2_a N, fmt(%9.3f %9.0g) labels("\rule{0pt}{1.6em}Adj. R$^2$" "Obs.")) cells( "b(star fmt(2)) se(fmt(2) par)") ///
/*title("`CTRY' & & & & \\")*/  mlabels(none)  collabels(none)

		
	
	

	
	
**** Time and Country Fixed Effects ***
*** Mode l3***
display "Time FE REGRESSION RESULTS FOR only housing"	
reghdfe pWIR_dif_ houseP_real_cpi_dif_, absorb(ctryid year) cluster(ctryid year)
estimates store m13_1990, title("(13)")


*** Model 14***
display "Time FE REGRESSION RESULTS FOR only stocks"	
reghdfe pWIR_dif_ shareP_real_cpi_dif_, absorb(ctryid year) cluster(ctryid year)
estimates store m14_1990, title("(14)")

	
*** Model 15***
display "Time FE REGRESSION RESULTS FOR housing and stocks"	
reghdfe pWIR_dif_ houseP_real_cpi_dif_ shareP_real_cpi_dif_, absorb(ctryid year) cluster(ctryid year)
estimates store m15_1990, title("(15)")
	
	
*** Model 16***
display "Time FE REGRESSION RESULTS FOR housing, stocks and MSCI"
reghdfe pWIR_dif_ houseP_real_cpi_dif_ shareP_real_cpi_dif_ MSCI_real_cpi_dif_, absorb(ctryid year) cluster(ctryid year)
estimates store m16_1990, title("(16)")
	
	

* STORE REGRESSION TABLES country and year FE post 1990


cap rm 2way_1990_country_yearFE.tex
estout m13_1990 m14_1990 m15_1990 m16_1990 using RR_2way_1990_country_timeFE.tex ///
, style(tex) drop(_cons) starlevels(* 0.10 ** 0.05 *** 0.010) varlabels(houseP_real_cpi_dif_ "House prices" shareP_real_cpi_dif_ "Share prices" MSCI_real_cpi_dif_ "MSCI world" _cons Constant)  ///
append  stats(r2_a N, fmt(%9.3f %9.0g) labels("\rule{0pt}{1.6em}Adj. R$^2$" "Obs.")) cells( "b(star fmt(2)) se(fmt(2) par)") ///
/*title("`CTRY' & & & & \\")*/  mlabels(none)  collabels(none)

	
	
*** Coefficient Plot Regression Model (3), 1990-2018
est clear
sort ctryid year
cap set scheme mygraphs
set scheme s1color



// regressions in growth rates

foreach i in 1 2 3 4 5 6 7 8 9 10 11 12 {

reg pWIR_dif_ houseP_real_cpi_dif_ shareP_real_cpi_dif_ if ctryid== `i'
est store m3_1990_`i'
}


label var houseP_real_cpi_dif_ "House prices"
label var shareP_real_cpi_dif_ "Share prices"


**** 3 columns
coefplot (m3_1990_3, lcolor(black) msymbol(O) mcolor(black) msize(medlarge) mlcolor(black)), bylabel(Switzerland) || m3_1990_6, bylabel(France)|| m3_1990_8, bylabel(Italy)|| ///
 m3_1990_5, bylabel(Spain) || m3_1990_9, bylabel(Japan)|| m3_1990_11, bylabel(Sweden)|| ///
 m3_1990_10, bylabel(Norway) || m3_1990_4, bylabel(Germany)|| m3_1990_1, bylabel(Australia)|| ///
 m3_1990_2, bylabel(Canada) || m3_1990_7, bylabel(United Kingdom)|| m3_1990_12, bylabel(United States)|| ///
 , drop(_cons) xscale(range(-1(0.25)1)) xtitle("		     private wealth-income ratio elasticities", size(small)) xline(0) byopts(compact cols(3)) legend() ciopts(lcol(black)recast(rcap)) subtitle(, color(black) fcolor(dimgray))
graph export "Fig_append_C_1.pdf", as(pdf) replace

